<%@ page contentType="text/html; charset=utf-8"%>
<%@ include file="../../../common/include.jsp"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>员工信息修改</title>
<jsp:include page="../../../common/head.jsp">
	 <jsp:param name="_useTab" value="true"/>
	  <jsp:param name="_useCalendar" value="true"/>
	  <jsp:param name="_useUpload" value="true"/>
</jsp:include>
<script language="javascript">
	isModalWindow = true;
	$(document).ready(function()
	{
		xjTabs.initTab();
		calAge("<fmt:formatDate value='${empEmployee.employeeBirthday}' pattern='yyyy-MM-dd'/>");
	});
	function calAge(birthday)
	{
		if(birthday==""||typeof birthday=="undefined")
			return;
		var returnAge;
	    var strBirthdayArr=birthday.split("-");
	    var birthYear = strBirthdayArr[0];
	    var birthMonth = strBirthdayArr[1];
	    var birthDay = strBirthdayArr[2];
	    
	    d = new Date();
	    var nowYear = d.getFullYear();
	    var nowMonth = d.getMonth() + 1;
	    var nowDay = d.getDate();
	    if(nowYear == birthYear)
	    {
	        returnAge = 0;//同年 则为0岁
	    }
	    else
	    {
	        var ageDiff = nowYear - birthYear ; //年之差
	        if(ageDiff > 0)
	        {
	            if(nowMonth == birthMonth)
	            {
	                var dayDiff = nowDay - birthDay;//日之差
	                if(dayDiff < 0)
	                {
	                    returnAge = ageDiff - 1;
	                }
	                else
	                {
	                    returnAge = ageDiff ;
	                }
	            }
	            else
	            {
	                var monthDiff = nowMonth - birthMonth;//月之差
	                if(monthDiff < 0)
	                {
	                    returnAge = ageDiff - 1;
	                }
	                else
	                {
	                    returnAge = ageDiff ;
	                }
	            }
	        }
	        else
	        {
	            returnAge = 0;//返回-1 表示出生日期输入错误 晚于今天
	        }
	    }
	    $("#nl").html(returnAge);
	}
	//返回
	function goback()
	{
		window.top.close();
	}
</script>

</head>
<body >
<form name="form1" id="employeeCallInForm"  action="updateEmployeeCallIn.do" method="post" enctype="multipart/form-data">
	<div id="body_div">
	<w:ShowTitle name="员工信息查看">
	<w:TitleButton funcName="返回" onClickFunction="goback()" urlImg="${ctx}/images/main/back.png"/>
	</w:ShowTitle>
	<div id="body_content">
	<div class="Sliding_tab">
		<ul>
			<li></li><li><span class="tabsLink" id="setTab0" link="#">员工信息</span></li><li></li>
			<li></li><li><span class="tabsLink" id="setTab1" link="showEducationTrainingEmployee.do?employeeId=${empEmployee.employeeId}">教育培训经历</span></li><li></li>
			<li></li><li><span class="tabsLink" id="setTab2" link="showPostEmployee.do?employeeId=${empEmployee.employeeId}">调动经历</span></li><li></li>
			<li></li><li><span class="tabsLink" id="setTab3" link="showAwardPunishmentEmployee.do?employeeId=${empEmployee.employeeId}">奖惩情况</span></li><li></li>
			<li></li><li><span class="tabsLink" id="setTab4" link="showCertificateEmployee.do?employeeId=${empEmployee.employeeId}">资格证书</span></li><li></li>
			<li></li><li><span class="tabsLink" id="setTab5" link="showPropertiesEmployee.do?employeeId=${empEmployee.employeeId}">自定义属性</span></li><li></li>
			<li></li><li><span class="tabsLink" id="setTab6" link="showContractEmployee.do?employeeId=${empEmployee.employeeId}">合同信息</span></li><li></li>
		</ul>
	</div>
	<table width="100%" id="content0" class="tabContent">
            <tr>
              <td colspan="8" class="left_align">人员自然信息</td>
            </tr>
            <tr>
              <td width="90" class="right_align">姓名</td>
              <td width="150" class="left_align">${empEmployee.employeeName}</td>
              <td width="120" class="right_align">员工编号</td>
              <td width="170" class="left_align">${empEmployee.employeeCode}</td>
              <td width="90" class="right_align">性别</td>
              <td width="150" class="left_align">
				${empEmployee.employeeGender}
              </td>
              <td rowspan="7" colspan="2" class="left_align">
              <c:choose>
              	<c:when test="${empEmployee.photoLocation ne null and empEmployee.photoLocation ne ''}">
              	<img src="${ctx}/${empEmployee.photoLocation}" id="employeePhoto" width="130" height="162" alt="无当前员工照片"/>
              	</c:when>
              	<c:otherwise>
              	<img src="${ctx}/images/main/employee.jpg" id="employeePhoto" width="130" height="162" title="尚未上传员工照片"/>
              	</c:otherwise>
              </c:choose>
              </td>
            </tr>
            <tr>
              <td class="right_align">身份证号</td>
              <td class="left_align">${empEmployee.idNumber}</td>
              <td class="right_align">出生日期</td>
              <td class="left_align"><fmt:formatDate value='${empEmployee.employeeBirthday}' pattern="yyyy-MM-dd" />
              </td>
              <td class="right_align">年龄</td>
              <td class="left_align" id="nl"></td>
            </tr>
            <tr>
              <td class="right_align">政治面貌</td>
              <td class="left_align">
              	<w:CodeDictOut value="${empEmployee.politicsStatus}"></w:CodeDictOut>
              </td>
              <td class="right_align">民族</td>
              <td class="left_align">
              	<w:CodeDictOut value="${empEmployee.nation}"></w:CodeDictOut>
              </td>
              <td class="right_align">移动电话</td>
              <td class="left_align">${empEmployee.mobileTelephone}</td>
            </tr>
            <tr>
              <td class="right_align">电子邮箱</td>
              <td class="left_align">${empEmployee.email}</td>
              <td class="right_align">档案号</td>
              <td class="left_align">${empFile.fileCode}</td>
              <td class="right_align">柜号</td>
              <td class="left_align">${empFile.containerNo}</td>
            </tr>
            <tr>
              <td class="right_align">位号</td>
              <td class="left_align">${empFile.locationNo}</td>
              <td class="right_align"></td>
              <td class="left_align"></td>
              <td class="right_align"></td>
              <td class="left_align"></td>
            </tr>
            <tr>
              <td colspan="6" class="left_align">岗位信息</td>
            </tr>
            <tr>
              <td class="right_align">人员身份</td>
              <td class="left_align">
              	<w:CodeDictOut value="${empEmployee.personnelIdentification}"></w:CodeDictOut>
              </td>
              <td class="right_align">所属单位</td>
              <td class="left_align">
              	${empEmployee.companyName}
              </td>
              <td class="right_align">所属部门</td>
              <td class="left_align">
              	${empEmployee.deptName}</td>
            </tr>
            <tr>
              <td class="right_align">在岗情况</td>
              <td class="left_align">
              	<w:CodeDictOut value="${empEmployee.onJobSituation}"></w:CodeDictOut>
              </td>
              <td class="right_align">工作证号</td>
              <td class="left_align">
              	${empEmployee.workPermitNumber}
              </td>
              <td class="right_align">所属劳务公司</td>
              <td class="left_align">
              	<w:CodeDictOut value="${empEmployee.laborServiceCompaniesId}"></w:CodeDictOut>
              </td>
            </tr>
            <tr>
              <td class="right_align">入本厂时间</td>
              <td class="left_align"><fmt:formatDate value='${empEmployee.joinCompanyDate}' pattern="yyyy-MM-dd" /></td>
              <td class="right_align">参加工作时间</td>
			  <td class="left_align"><fmt:formatDate value='${empEmployee.workTime}' pattern="yyyy-MM-dd" /></td>
              <td class="right_align">行政级别</td>
              <td class="left_align">
              	<w:CodeDictOut value="${empEmployee.administrativeLevels}"></w:CodeDictOut>
			  </td>
              <td class="right_align" width="90">是否班组长</td>
              <td class="left_align" colspan="5">${empEmployee.isMonitor}</td>
            </tr>
            <tr>
              <td class="right_align">工龄间断</td>
              <td class="left_align">
              	${empEmployee.workYearInterrupt}
              </td>
              <td class="right_align">岗位类别</td>
              <td class="left_align" colspan="6">
              <w:CodeDictOut value="${empEmployee.postCategoryMaster}"></w:CodeDictOut>
              </td>
            </tr>
            <c:forEach items="${postlist}" var="postobj">
            <tr>
              <td class="right_align">岗位名称</td>
              <td class="left_align">
              	${postobj.postName}
              </td>
              <td class="right_align">从事现岗位时间</td>
              <td class="left_align">
              	<fmt:formatDate value='${postobj.workExperienceTime}' pattern="yyyy-MM-dd" />
              </td>
              <td>${postobj.postStatus}</td>
              <td class="left_align"></td>
              <td class="right_align"></td>
			  <td class="left_align"></td>
            </tr>
            
            </c:forEach>
            <tr>
              <td colspan="9" class="left_align">职称信息</td>
            </tr>
            <tr>
              <td class="right_align">职称系列</td>
              <td class="left_align">
              	<w:CodeDictOut value="${empEmployee.jobTitle}"></w:CodeDictOut>
              </td>
              <td class="right_align">技术职务</td>
              <td class="left_align">
              	<w:CodeDictOut value="${empEmployee.technicalPosition}"></w:CodeDictOut>
              </td>
              <td class="right_align">职称级别</td>
              <td class="left_align">
              	<w:CodeDictOut value="${empEmployee.titleLevel}"></w:CodeDictOut>
              </td>
              <td class="right_align">资格取得时间</td>
              <td colspan="2" class="left_align"><fmt:formatDate value='${empEmployee.takeQualifyDate}' pattern="yyyy-MM-dd" /></td>
            </tr>
            <tr>
              <td class="right_align">主任师资格</td>
              <td colspan="8" class="left_align">${empEmployee.qualification}</td>
            </tr>
            <tr>
              <td class="right_align">备注</td>
              <td colspan="8" class="left_align">
              	${empEmployee.empRemark}
              </td>
            </tr>
             <tr id="uploadContainer">
              <td class="right_align">附件</td>
              <td colspan="7" class="left_align">
              	<w:uploadFile isList="true" isAdd="false" allowDeletions="false" folder="employee" beanName="employee" belongId="${empEmployee.employeeId}" hideContainerWhenNoFile="true" containerId="uploadContainer"></w:uploadFile>
              </td>
            </tr>
          </table>
	</div>
	</div>	
</form>
</body>
</html> 